/*
 * @Author: 张旭东 zxd12345688@qq.com
 * @Date: 2025-09-10 10:02:03
 * @LastEditors: 张旭东 zxd12345688@qq.com
 * @LastEditTime: 2025-09-10 14:42:23
 * @FilePath: \前端\city\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: 
 * https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    // 路由重定向
    redirect:'/city'
  },
  // 配置大屏路由
  {
    path:'/city',
    name:'city',
    component:()=>import('../pages/index.vue')
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
